﻿using FlowCanvas.Nodes;

namespace Yoozoo.Gameplay.Liberty.Nodes
{
    public class DebugLogText : CallableActionNode<NodeCanvas.Tasks.Actions.DebugLogText.LogMode, string>
    {
        
        public override void Invoke(NodeCanvas.Tasks.Actions.DebugLogText.LogMode logMode, string text)
        {
            switch (logMode)
            {
                case NodeCanvas.Tasks.Actions.DebugLogText.LogMode.Log:
                    {
                        UnityEngine.Debug.Log(text);
                    }
                    break;
                
                case NodeCanvas.Tasks.Actions.DebugLogText.LogMode.Warning:
                    {
                        UnityEngine.Debug.LogWarning(text);
                    }
                    break;
                
                case NodeCanvas.Tasks.Actions.DebugLogText.LogMode.Error:
                    {
                        UnityEngine.Debug.LogError(text);
                    }
                    break;
            }
        }
    }
}